package com.guaju.yueshangLife.imageloader;

import android.content.Context;
import android.net.Uri;
import android.view.LayoutInflater;
import android.widget.ImageView;

import com.facebook.drawee.view.SimpleDraweeView;
import com.guaju.yueshangLife.R;
import com.youth.banner.loader.ImageLoader;

public class FrescoImageLoader extends ImageLoader {
    int width;
    int screenHeight;

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getScreenHeight() {
        return screenHeight;
    }

    public void setScreenHeight(int screenHeight) {
        this.screenHeight = screenHeight;
    }

    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        imageView.setImageURI(Uri.parse((String) path));
    }


    @Override
    public ImageView createImageView(Context context) {
        SimpleDraweeView simpleDraweeView = (SimpleDraweeView) LayoutInflater.from(context).inflate(R.layout.item_add_sdv, null, false);
        return simpleDraweeView;
    }
}
